package com.zhaoqi.hr.dto.response;

import com.zhaoqi.hr.entity.JobApplication;

import java.time.LocalDateTime;
import java.util.Objects;

/**
 * 岗位申请响应DTO
 */
public class JobApplicationResponse {
    
    /**
     * 申请ID
     */
    private Long id;
    
    /**
     * 岗位ID
     */
    private Long jobPostingId;
    
    /**
     * 岗位标题
     */
    private String jobTitle;
    
    /**
     * 申请者ID
     */
    private Long workerId;
    
    /**
     * 申请者姓名
     */
    private String workerName;
    
    /**
     * 申请者手机号
     */
    private String workerPhone;
    
    /**
     * 申请说明
     */
    private String applicationNote;
    
    /**
     * 期望薪资
     */
    private String expectedSalary;
    
    /**
     * 个人优势
     */
    private String personalAdvantage;
    
    /**
     * 申请状态
     */
    private JobApplication.ApplicationStatus status;
    
    /**
     * 雇主回复
     */
    private String employerReply;
    
    /**
     * 申请时间
     */
    private LocalDateTime appliedAt;
    
    /**
     * 处理时间
     */
    private LocalDateTime processedAt;
    
    /**
     * 创建时间
     */
    private LocalDateTime createdAt;
    
    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;

    // Getter and Setter methods
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getJobPostingId() {
        return jobPostingId;
    }

    public void setJobPostingId(Long jobPostingId) {
        this.jobPostingId = jobPostingId;
    }

    public String getJobTitle() {
        return jobTitle;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    public Long getWorkerId() {
        return workerId;
    }

    public void setWorkerId(Long workerId) {
        this.workerId = workerId;
    }

    public String getWorkerName() {
        return workerName;
    }

    public void setWorkerName(String workerName) {
        this.workerName = workerName;
    }

    public String getWorkerPhone() {
        return workerPhone;
    }

    public void setWorkerPhone(String workerPhone) {
        this.workerPhone = workerPhone;
    }

    public String getApplicationNote() {
        return applicationNote;
    }

    public void setApplicationNote(String applicationNote) {
        this.applicationNote = applicationNote;
    }

    public String getExpectedSalary() {
        return expectedSalary;
    }

    public void setExpectedSalary(String expectedSalary) {
        this.expectedSalary = expectedSalary;
    }

    public String getPersonalAdvantage() {
        return personalAdvantage;
    }

    public void setPersonalAdvantage(String personalAdvantage) {
        this.personalAdvantage = personalAdvantage;
    }

    public JobApplication.ApplicationStatus getStatus() {
        return status;
    }

    public void setStatus(JobApplication.ApplicationStatus status) {
        this.status = status;
    }

    public String getEmployerReply() {
        return employerReply;
    }

    public void setEmployerReply(String employerReply) {
        this.employerReply = employerReply;
    }

    public LocalDateTime getAppliedAt() {
        return appliedAt;
    }

    public void setAppliedAt(LocalDateTime appliedAt) {
        this.appliedAt = appliedAt;
    }

    public LocalDateTime getProcessedAt() {
        return processedAt;
    }

    public void setProcessedAt(LocalDateTime processedAt) {
        this.processedAt = processedAt;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JobApplicationResponse that = (JobApplicationResponse) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    @Override
    public String toString() {
        return "JobApplicationResponse{" +
                "id=" + id +
                ", jobPostingId=" + jobPostingId +
                ", jobTitle='" + jobTitle + '\'' +
                ", workerId=" + workerId +
                ", workerName='" + workerName + '\'' +
                ", workerPhone='" + workerPhone + '\'' +
                ", applicationNote='" + applicationNote + '\'' +
                ", expectedSalary='" + expectedSalary + '\'' +
                ", personalAdvantage='" + personalAdvantage + '\'' +
                ", status=" + status +
                ", employerReply='" + employerReply + '\'' +
                ", appliedAt=" + appliedAt +
                ", processedAt=" + processedAt +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }
}
